/* eslint-disable */
import Layout from '../views/layout/Layout';
import LayoutServices from '../views/myWallet/services/Layout';

/**
 * @for meta
 * @param title 标题
 * @param icon 图标
 * @param name 用来匹配路由名称
 * @param check
 */


const eosRouter = [
  // 资源中心 - RAM - REX
  {
    path: '/resources',
    component: Layout,
    redirect: '/resources',
    meta: { title: 'ramExchange' },
    children: [
      {
        path: 'ram',
        name: 'ramExchange',
        component: resolve => require(['@/views/ramCenter/Index'], resolve),
        meta: { title: 'ramExchange', tradeMenu: true, resource: true },
      },
      {
        path: 'rex',
        name: 'rexExchange',
        component: resolve => require(['@/views/rexCenter/Index'], resolve),
        meta: { title: 'rexExchange', tradeMenu: true, resource: true },
      },
      {
        path: 'cpu_net',
        name: 'cpuExchange',
        component: resolve => require(['@/views/cpuCenter/Index'], resolve),
        meta: { title: 'cpuExchange', tradeMenu: true, resource: true },
      }
    ],
  },
  // 内嵌交易
  {
    path: '/embed-trade/:trade',
    name: 'embedTrade',
    component: resolve => require(['@/views/tradingCenter/EmbedTrade'], resolve),
    meta: { title: 'Exchange' },
  },
  // 会员中心、钱包中心
  {
    path: '/my-wallet',
    component: Layout,
    meta: { title: 'mywallet' },
    children: [
      {
        path: '',
        component: resolve => require(['@/views/myWallet/Index.vue'], resolve),
        meta: { title: 'mywallet' },
        children: [
          {
            path: '/',
            name: 'vueCoinList',
            component: resolve => require(['@/views/myWallet/components/VueCoinList'], resolve),
            meta: { title: 'mywallet', isUser: true  },
          },
          // 资源管理
          {
            path: '/ram',
            name: 'ram',
            component: resolve => require(['@/views/myWallet/eosResource/Ram'], resolve),
            meta: { title: 'mywallet', isUser: true },
          },
          {
            path: '/cpu',
            name: 'cpu',
            component: resolve => require(['@/views/myWallet/eosResource/Cpu'], resolve),
            meta: { title: 'mywallet', isUser: true },
          },
          {
            path: '/net',
            name: 'net',
            component: resolve => require(['@/views/myWallet/eosResource/Net'], resolve),
            meta: { title: 'mywallet', isUser: true },
          },
          {
            path: '/transfer-accounts', // 转账
            name: 'transferAccounts',
            component: resolve => require(['@/views/myWallet/transferAccounts.vue'], resolve),
            meta: { title: 'transfer', isUser: true },
          },
          {
            path: '/member', // 会员中心
            name: 'member',
            component: resolve => require(['@/views/myWallet/member/Index.vue'], resolve),
            meta: { title: 'mywallet', isUser: true },
          },
          {
            path: '/services', // 会员服务
            component: LayoutServices,
            meta: { title: 'mywallet' },
            children: [
              {
                path: '', //
                name: 'services',
                component: resolve => require(['@/views/myWallet/services/Index.vue'], resolve),
                meta: { title: 'mywallet', isUser: true, services: true },
              },
              {
                path: '/services/email', // 绑定邮箱
                name: 'email',
                component: resolve => require(['@/views/myWallet/services/components/BindEmailSeting.vue'], resolve),
                meta: { title: 'mywallet', isUser: true, services: true },
              },
              {
                path: '/services/quotation', // 行情提醒设置
                name: 'quotation',
                component: resolve => require(['@/views/myWallet/services/components/QuotationRemind.vue'], resolve),
                meta: { title: 'mywallet', isUser: true, services: true },
              },
              {
                path: '/services/profits', // 盈亏统计详情
                name: 'profits',
                component: resolve => require(['@/views/myWallet/services/components/Profits.vue'], resolve),
                meta: { title: 'mywallet', isUser: true, services: true },
              },
              {
                path: '/services/getCpu', // 免费领取CPU
                name: 'getCpu',
                component: resolve => require(['@/views/myWallet/services/components/getCpu.vue'], resolve),
                meta: { title: 'mywallet', isUser: true, services: true },
              },
            ],
          },
        ],
      },
    ]
  },
  // 大使活动
  {
    path: '/events/influencer',
    component: Layout,
    redirect: '/events/influencer',
    meta: { title: 'activity' },
    children: [
      {
        path: '',
        name: 'influencer',
        component: resolve => require(['@/views/activity/ambassador/Index'], resolve),
        meta: { title: 'influencer', check: true },
      },
      // 申请大使
      {
        path: '/events/influencer/apply',
        name: 'influencerForm',
        component: resolve => require(['@/views/activity/ambassador/apply'], resolve),
        meta: { title: 'influencerForm', check: true },
      },
      // 大使活动详情页
      {
        path: '/events/influencer/detail',
        name: 'influencerInfo',
        component: resolve => require(['@/views/activity/ambassador/detail'], resolve),
        meta: { title: 'influencerInfo', check: true },
      },
    ],
  },
  // 大使活动2
  {
    path: '/events/influencers',
    component: Layout,
    redirect: '/events/influencers',
    meta: { title: 'activity' },
    children: [
      {
        path: '',
        name: 'influencers',
        component: resolve => require(['@/views/activity/influencers/Index'], resolve),
        meta: { title: 'influencers', check: true },
      }
    ],
  },
  // 2019 年 51节活动
  {
    path: '/events/benefits',
    component: Layout,
    redirect: '/events/benefits',
    meta: { title: 'activity' },
    children: [
      {
        path: '/events/benefits',
        name: 'benefits',
        component: resolve => require(['@/views/activity/benefits/Index'], resolve),
        meta: { title: 'benefits', check: false},
      },
    ],
  },
  // Newdex量化交易大赛
  {
    path: '/events/api-trade',
    component: Layout,
    redirect: '/events/api-trade',
    meta: { title: 'apiTrade' },
    children: [
      {
        path: '',
        name: 'apiTrade',
        component: resolve => require(['@/views/activity/apiTrade/Index'], resolve),
        meta: { title: 'apiTrade', check: false},
      },
      // 点赞页
      {
        path: '/events/media',
        name: 'media',
        component: resolve => require(['@/views/activity/apiTrade/ThumbsUp'], resolve),
        meta: { title: 'media', check: false },
      },
    ],
  },
  // 波场预热
  {
    path: '/events/next-stop',
    component: Layout,
    redirect: '/events/next-stop',
    meta: { title: 'nextStop' },
    children: [
      {
        path: '/events/next-stop',
        name: 'nextStop',
        component: resolve => require(['@/views/activity/tron/Index'], resolve),
        meta: { title: 'nextStop', check: false},
      },
    ],
  },
  // 周年活动
  {
    path: '/events/anniversary',
    component: Layout,
    redirect: '/events/anniversary',
    meta: { title: 'anniversarySalute' },
    children: [
      {
        path: '/events/anniversary',
        name: 'anniversary',
        component: resolve => require(['@/views/activity/anniversary/Index'], resolve),
        meta: { title: 'anniversarySalute', check: false},
      },
      {
        path: '/events/anniversary/articles',
        name: 'articles',
        component: resolve => require(['@/views/activity/anniversary/articles'], resolve),
        meta: { title: 'essayActivity', check: false },
      },
    ],
  },
  // 寻宝活动
  {
    path: '/events/treasure-hunt',
    component: Layout,
    redirect: '/events/treasure-hunt',
    meta: { title: 'winningRecord' },
    children: [
      {
        path: '/events/treasure-hunt',
        name: 'treasure',
        component: resolve => require(['@/views/activity/anniversary/treasureHunt'], resolve),
        meta: { title: 'winningRecord', check: false},
      },
    ],
  },
  // 中秋节活动
  {
    path: '/events/mid-autumn',
    component: Layout,
    redirect: '/events/mid-autumn',
    meta: { title: 'midAutumn' },
    children: [
      {
        path: '/events/mid-autumn',
        name: 'midAutumn',
        component: resolve => require(['@/views/activity/midAutumn/index'], resolve),
        meta: { title: 'midAutumn', check: false},
      },
    ],
  },
  // 万圣节活动
  {
    path: '/events/halloween',
    component: Layout,
    redirect: '/events/halloween',
    meta: { title: 'halloween' },
    children: [
      {
        path: '/events/halloween',
        name: 'halloween',
        component: resolve => require(['@/views/activity/halloween/Index.vue'], resolve),
        meta: { title: 'halloween', check: false},
      },
    ],
  },
  // 圣诞活动
  {
    path: '/events/christmas',
    component: Layout,
    redirect: '/events/christmas',
    meta: { title: 'activity' },
    children: [
      {
        path: '',
        name: 'christmas',
        component: resolve => require(['@/views/activity/christmas/Index'], resolve),
        meta: { title: 'christmas', check: true },
      }
    ],
  },
  // 情人节活动
  {
    path: '/events/valentine2020',
    component: Layout,
    redirect: '/events/valentine2020',
    meta: { title: 'valentine' },
    children: [
      {
        path: '/events/valentine2020',
        name: 'valentine',
        component: resolve => require(['@/views/activity/valentine/Index.vue'], resolve),
        meta: { title: 'valentine', check: false},
      },
    ],
  },
  // 活动模版路由
  {
    path: '/events',
    component: Layout,
    meta: { title: 'activity' },
    children: [
      {
        path: '/events/:name',
        name: 'events',
        component: resolve => require(['@/views/activity/Index'], resolve),
        meta: { title: 'activity', check: true },
      },
    ],
  },
  // 会员未登录
  {
    path: '/member-not-logged',
    component: Layout,
    meta: { title: 'mywallet' },
    children: [
      {
        path: '/',
        name: 'member-not-logged',
        component: resolve => require(['@/views/myWallet/member/MemberNotLogged.vue'], resolve),
        meta: { title: 'mywallet' },
      },
    ]
  },
  // 每日抽奖
  {
    path: '/lucky-draw',
    component: Layout,
    meta: { title: 'luckyDraw' },
    children: [
      {
        path: '/',
        name: 'luckyDraw',
        component: resolve => require(['@/views/activity/luckyDraw/Index'], resolve),
        meta: { title: 'luckyDraw' },
      },
    ]
  },
  // 愚人节
  {
    path: '/fool-day',
    component: Layout,
    meta: { title: 'foolDay' },
    children: [
      {
        path: '/',
        name: 'foolDay',
        component: resolve => require(['@/views/activity/foolDay/Index'], resolve),
        meta: { title: 'foolDay' },
      },
    ]
  },
  // 糖果盒子
  {
    path: '/candy-airdrop',
    component: Layout,
    meta: { title: 'candyBox' },
    children: [
      {
        path: '/',
        name: 'candyBox',
        component: resolve => require(['@/views/activity/candyBox/Index'], resolve),
        meta: { title: 'candyBox' },
      },
    ]
  },
  // 矿池
  {
    path: '/newpool',
    component: Layout,
    meta: { title: 'newpoolEos' },
    children: [
      {
        path: '/newpool/eos',
        name: 'newposEos',
        component: resolve => require(['@/views/newpool/Eos'], resolve),
        meta: { title: 'newpos' },
      },
      {
        path: '/newpool/bos',
        name: 'newposBos',
        component: resolve => require(['@/views/newpool/Bos'], resolve),
        meta: { title: 'newpos' },
      },
    ]
  },

  // 渠道方分成
  {
    path: '/partner',
    component: Layout,
    meta: { title: 'index' },
    children: [
      {
        path: '/',
        name: 'partner',
        component: resolve => require(['@/views/admin/Index.vue'], resolve),
        meta: { title: 'index' },
      },
      { // 成交记录查询
        path: '/admin/deals',
        name: 'deals',
        component: resolve => require(['@/views/admin/Index.vue'], resolve),
        meta: { title: 'index' },
      },
    ]
  },

  // 兑换 Newdex code
  {
    path: '/swap',
    component: Layout,
    meta: { title: 'swap' },
    children: [
      {
        path: '/',
        name: 'swap',
        component: resolve => require(['@/views/codex/Index.vue'], resolve),
        meta: { title: 'swap' },
      },
    ]
  },
  // 兑换 Newdex code 内嵌
  {
    path: '/embed-swap',
    component: Layout,
    meta: { title: 'swap' },
    children: [
      {
        path: '/',
        name: 'embedSwap',
        component: resolve => require(['@/views/codex/EmbedSwap.vue'], resolve),
        meta: { title: 'swap' },
      },
    ]
  }
];

export default eosRouter
